const express = require('express')
const compression = require('compression')  //npm i compression 下载压缩

const https = require('https')
const fs = require('fs')

const app = express()
const options = {
    cert:fs.readFileSync('./full_chain.pem'),
    key:fs.readFileSync('./private.key')
}
app.use(compression())
app.use(express.static('./dist'))

// app.listen(80,()=>{
//     console.log('server runing at http://127.0.0.1')
// })

https.createServer(options,app).listen(443)